package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.SysVechicleDto;
import com.ruoyi.system.api.domain.SysVehicles;
import com.ruoyi.system.api.domain.UpdateUseUnitDTO;
import com.ruoyi.system.api.factory.RemoteVehiclesFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Set;

@FeignClient(contextId = "remoteVehiclesService", value = ServiceNameConstants.VEHICLES_SERVICE, fallbackFactory = RemoteVehiclesFallbackFactory.class)
public interface RemoteVehiclesService {
    /**
     * 修改车辆状态为已派遣
     */
    @PostMapping("/vehicles/updateStatus")
    public AjaxResult updateStatus(@RequestBody Set<SysVehicles> sysVehicles);
    /**
     * 查询车辆信息
     */
    @PostMapping("/vehicles/selectVehicles")
    public R<Set<SysVechicleDto>> selectVehicles(@RequestBody Set<SysVehicles> sysVehicles);

    @PostMapping("/vehicles/updateUseUnit")
    AjaxResult updateUseUnit(@RequestBody UpdateUseUnitDTO updateUseUnitDTO);

    @PostMapping("/vehicles/removeUseUnit")
    AjaxResult removeUseUnit(@RequestBody Set<SysVehicles> sysVehicles);
}
